<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS Grid布局</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      html,
      body {
        width: 100%;
        height: 100%;
      }
      .wrapper > div {
        border: 1px black solid;
      }

      .wrapper > div:nth-child(odd) {
      }

      .wrapper {
        height: 100%;
        display: grid;
        grid-template-columns: 1fr 4fr 4fr 1fr;
        grid-template-rows: 50px minmax(100px, 1fr) minmax(100px, 1fr) 30px;
        grid-template-areas:
          'header header header header'
          'leftCol midTop midTop rightCol'
          'leftCol midBottom midBottom rightCol'
          'footer footer footer footer';
        gap: 5px;
      }

      .header {
        grid-area: header;
        background-color: LightSeaGreen;
      }

      .leftCol {
        grid-area: leftCol;
        background-color: orange;
      }

      .rightCol {
        grid-area: rightCol;
        background-color: lightblue;
      }

      .midTop {
        grid-area: midTop;
        background-color: lightgrey;
      }

      .midBottom {
        grid-area: midBottom;
        background-color: pink;
      }

      .footer {
        grid-area: footer;
        background-color: lightgreen;
      }
    </style>
  </head>
  <body>
    <div class="wrapper">
      <div class="header">Header</div>
      <div class="leftCol">LeftCol</div>
      <div class="rightCol">RightCol</div>
      <div class="midTop">midTop</div>
      <div class="midBottom">midBottom</div>
      <div class="footer">Footer</div>
    </div>
  </body>
</html>
